import request from '@/utils/request'

// 查询退料区储位列表
export function listLocation(query) {
  return request({
    url: '/api/return/location/page',
    method: 'get',
    params: query
  })
}

// 查询退料区储位详细
export function getLocation(id) {
  return request({
    url: '/api/return/location/' + id,
    method: 'get'
  })
}

// 新增退料区储位
export function addLocation(data) {
  return request({
    url: '/api/return/location/add',
    method: 'post',
    data: data
  })
}

// 修改退料区储位
export function updateLocation(data) {
  return request({
    url: '/api/return/location/update',
    method: 'post',
    data: data
  })
}

// 删除退料区储位
export function delLocation(id) {
  return request({
    url: '/api/return/location/delete/' + id,
    method: 'post'
  })
}
